#ifndef RINGBUFFER_H
#define RINGBUFFER_H

#include "ringbuffer_global.h"

class  RingbufferNormal : public RingBuffer
{
public:
    RingbufferNormal(unsigned int ringlen);
    ~RingbufferNormal();
    bool PushData(unsigned char *data, unsigned long long datalen);
    unsigned int PopData(unsigned char *data, unsigned long long datalen);
    unsigned long long PeekData(unsigned char *data, unsigned long long datalen);

private:
    inline unsigned long long length();
    inline unsigned long long unuselen();
    unsigned long long read;
    unsigned long long write;
    const unsigned long long len;
    unsigned char* dataarea;
};

#endif // RINGBUFFER_H
